import React from "react";
import ReactDom from "react-dom";
import Sub from "./Sub";

class CustomUI extends React.Component{
  constructor(props){
    super(props);
    this.state={num:0};
    this.handle = this.handle.bind(this);
  }

  handle(num){
    this.setState({num})
  }

  render(){
    return <div>
      <h3>{this.state.num}</h3>
      <Sub onFive={this.handle} />
    </div>
  }
}

ReactDom.render(<CustomUI />,document.body);
